﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class ComposeMessage : System.Web.UI.Page
{
    public double UserID = 0;
    public string Name = "";
    public string EmailID = "";
    public string MessageEmailID = "";
    protected void Page_Load(object sender, EventArgs e)
    {


        if (Session["FullName"].ToString() != "" || Session["UserID"].ToString() != "" || Session["EmailID"].ToString() != "")
        {
            Name = Session["FullName"].ToString();
            UserID = Convert.ToDouble(Session["UserID"].ToString());
            EmailID = Session["EmailID"].ToString();
            MessageEmailID = Session["EmailID1"].ToString();
            

        }
        else
        {
            Response.Redirect("frmLogin.aspx");
        }
        ToID1.Text = MessageEmailID;
    }
    protected void Send_OnClick(object sender, EventArgs e)
    {

        string[] NameField = new string[6];
        string[] ValueField = new string[6];

        NameField[0] = "@EmailID";
        NameField[1] = "ToID";
        NameField[2] = "@subject";
        NameField[3] = "@Description";
        NameField[4] = "@Signatures";
        NameField[5] = "@UserID";

        ValueField[0] = "ankit.khetan8@gmail.com";
        ValueField[1] = ToID1.Text;
        ValueField[2] = Subject1.Text;
        ValueField[3] = Description1.Text;
        ValueField[4] = Sign1.Text;
        ValueField[5] = "1";

        string dtbl = SocialKlee.BusinessLogicLayer.BOLyer.ExecuteStoreProcedure("SocialKlee_EmailInsert", NameField, ValueField);
    }
}